FROM liujiboy/pcl
RUN apt-get install -y python3-pip
RUN pip3 install flask flask_cors -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 install virtualenv -i https://pypi.tuna.tsinghua.edu.cn/simple


RUN mkdir -p /root/pcl/src
RUN mkdir -p /root/pcl/src/teethbite
RUN mkdir -p /root/upload
RUN mkdir -p /root/testpcl
RUN mkdir -p /root/testpcl/116
COPY src /root/pcl/src/
COPY src/teethbite /root/pcl/src/teethbite/
COPY testpcl/patient /root/testpcl/116/
# COPY point_source/ /root/upload

RUN mkdir -p /root/pcl/build/
RUN cmake -S /root/pcl/src -B /root/pcl/build
WORKDIR /root/pcl/build
RUN make
EXPOSE 8080
# ENTRYPOINT [ "python3","/root/app.py" ]

RUN cd /root/pcl/src/teethbite
# RUN virtualenv ENV
# RUN cd ENV
# RUN source ./bin.activate
RUN pip3 install -r /root/pcl/src/teethbite/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 list
WORKDIR /root/pcl/src/teethbite
# RUN python3 /root/pcl/src/teethbite/main.py
ENTRYPOINT [ "python3","/root/pcl/src/teethbite/main.py" ]